

<?php if ($this->_var['full_page']): ?>
<?php echo $this->fetch('pageheader.htm'); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'js/utils.js,listtable.js')); ?>

<form method="post" action="" name="listForm">

<div class="list-div" id="listDiv">
<?php endif; ?>

<table width="100%" cellpadding="3" cellspacing="1" id="listTable">
  <tr>
  	<th>Country Name</th>
    <th>State Name</th>
	<th>City Name</th>
    <th>Handler</th>
  </tr>
  <?php $_from = $this->_var['city']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'stat');if (count($_from)):
    foreach ($_from AS $this->_var['stat']):
?>
  <tr>
  	<td style="text-align:center"><?php echo $this->_var['stat']['country_name']; ?></td>
    <td style="text-align:center"><?php echo $this->_var['stat']['state_name']; ?></td>
	<td style="text-align:center"><?php echo $this->_var['stat']['city_name']; ?></td>
    <td align="center">
    <a href="city.php?act=modify&cat_id=<?php echo $this->_var['stat']['city_id']; ?>" ><img src="/admin/images/icon_edit.gif" width="16" height="16" border="0" /></a> |	 
    <a href="city.php?act=delete&cat_id=<?php echo $this->_var['stat']['city_id']; ?>" ><img src="/admin/images/icon_drop.gif" width="16" height="16" border="0" /></a>
    </td>
  </tr>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>


<table id="page-table" cellspacing="0">
  <tr>
    <td align="right" nowrap="true">
    <?php echo $this->fetch('page.htm'); ?>
    </td>
  </tr>
</table>

<?php if ($this->_var['full_page']): ?>

</div>
</form>

<form method="post" action="city.php" name="addForm">
<table >
	<tr>
		<td>Country:</td>
		<td>
	  	<select id="country" name="country" class="lcl_texte" style="padding-top:5px;text-align:left;">
			   <?php $_from = $this->_var['country']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'value');if (count($_from)):
    foreach ($_from AS $this->_var['value']):
?>
			   <option value="<?php echo $this->_var['value']['country_id']; ?>" ><?php echo $this->_var['value']['country_name']; ?></option> 			
			   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			   </select>
		</td>
		<td>State:</td>
		<td>
	  	<select id="state" name="state" class="lcl_texte" style="padding-top:5px;text-align:left;">
			   <?php $_from = $this->_var['state']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'value');if (count($_from)):
    foreach ($_from AS $this->_var['value']):
?>
			   <option value="<?php echo $this->_var['value']['state_id']; ?>" ><?php echo $this->_var['value']['state_name']; ?></option> 			
			   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			   </select>
		</td>
		<td>
		New City:
		</td>
		<td>
			<input type="text" name="new_type" style="float:center;color:<?php echo $this->_var['goods_name_color']; ?>;" size="30" />
		</td>
		<td>
          	<input type="submit" value="Add" class="button" />
          	<input type="hidden" name="act" value="add_newtype" />
		</td>
	</tr>
	
</table>
</form>


<?php echo $this->fetch('pagefooter.htm'); ?>
<?php endif; ?>
